package org.jeecg.modules.demo.widthmanagement.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.demo.widthmanagement.entity.WidthManagement;
import org.jeecg.modules.demo.widthmanagement.entity.WidthManagmentInfo;
import org.jeecg.modules.demo.widthmanagement.mapper.WidthManagementMapper;
import org.jeecg.modules.demo.widthmanagement.service.IWidthManagementService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Description: 股东提现管理
 * @Author: jeecg-boot
 * @Date: 2022-01-14
 * @Version: V1.0
 */
@Service
public class WidthManagementServiceImpl extends ServiceImpl<WidthManagementMapper, WidthManagement> implements IWidthManagementService {
    @Autowired
    private WidthManagementMapper widthManagementMapper;

    @Override
    public void updateStatus(String status, String id) {
        widthManagementMapper.updateStatus(status, id);
    }

    //查询提现待审核数量
    public String getWithdrawalToReview(String storeId) {
        return widthManagementMapper.getWithdrawalToReview(storeId);
    }

    //查询可提现金额
    public String getCanWithdrawalAmount(String storeId, String stockId) {
        return widthManagementMapper.getCanWithdrawalAmount(storeId, stockId);
    }

    // 查询提现记录
    @Override
    public List<WidthManagmentInfo> getWidthManagmentList(Integer pageNo, Integer pageSize, String storeId, String stockId) {
        return widthManagementMapper.getWidthManagmentList(pageNo, pageSize, storeId, stockId);
    }
}
